{# vim: set et ts=8 sts=4 sw=4 ai: #}
{% extends "wiki.html" %}
{% block menu %}
{{ super() }}
{% include 'snippets/menu.html' %}
{% include 'snippets/menutree.html' %}
{% endblock %}
{% block navbardropdown %}
{% include 'snippets/navbardropdown_rename_remove.html' %}
                    <div class="dropdown-divider mt-5 mb-5"></div>
{{ super() }}
{% endblock %}
{% block content %}
<h2 class="pr-20 d-inline-block">Page Index</h2>
<div class="d-inline-block custom-switch font-size-12 mb-10">
  <input type="checkbox" id="switch-headings" value="" onchange="otterwiki.toggleClass(event.target.checked,'pagetoc')">
  <label for="switch-headings">Toggle page headings</label>
</div>
<div style="">
<div class="pageindex-columns" style="">
{% for letter, pagelist in pages.items()|sort %}
<div class="pageindex-letterblock"><h2 class="content-title font-weight-bolder pageindex-header">{{letter}}</h2>
{% for page in pagelist %}
<div class="pageindex-pageblock" style="padding-left:{{1.5 * page.depth}}rem;">
<a href="{{ page.url }}" class="global-toc-link
{%- if has_children %}
pageindex-folder font-weight-bold
{%- else %}
pageindex-page
{%- endif %}">{{page.title}}</a>
{% if page.toc %}
<div class="pagetoc" style="display: none;">
{% for tocdepth, header, url in page.toc %}
<div style="word-break: all; padding-left:{{1 * tocdepth}}rem;">
<a href="{{ url }}" class="global-toc-link font-weight-light font-italic pageindex-heading">{{header}}</a><br/>
</div>
{% endfor %}
</div>
{% endif %}{# page_toc #}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endblock content %}
